#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
void main ()
{
srand(time(NULL));
const int m=5;
const int n=5;
int mas [m] [n];
int sum=0;
	for (int i=0;i<m;i++)
	{
		for (int j=0;j<n;j++)
		{
			mas [i] [j]=rand()%10;
			cout<<mas [i] [j]<<" ";
			if (j==4)
			{cout<<"\n";}
		}
	}
	int i=0,j=0;
	sum=mas [i][0];
	for (i=0;i<m;i++)
	{   j=0;
		j=j+i;
		for (;j<n;j++)
		{ 
			if(mas [i] [j]>sum)
			{sum=mas [i] [j];}
			
		}
	}
	cout<<"\n";
	cout<<"maksimalnoe znachenie"<<sum;
	cout<<"\n";
}